package com.stylefeng.guns.common.persistence.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author lmshe
 * @since 2018-07-12
 */
@TableName("w_category")
public class Category extends Model<Category> {

    private static final long serialVersionUID = 1L;

    /**
     * 分类表
     */
	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
    /**
     * 父级类别id，默认为0，表示最高级
     */
	@TableField("parent_id")
	private Integer parentId;
    /**
     * 类别名称
     */
	@TableField("category_name")
	private String categoryName;
    /**
     * 类别描述
     */
	@TableField("category_desc")
	private String categoryDesc;
    /**
     * 是否删除，0否1是，默认为0
     */
	@TableField("is_delete")
	private Integer isDelete;
	private Date createtime;


	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getParentId() {
		return parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	public String getCategoryDesc() {
		return categoryDesc;
	}

	public void setCategoryDesc(String categoryDesc) {
		this.categoryDesc = categoryDesc;
	}

	public Integer getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Category{" +
			"id=" + id +
			", parentId=" + parentId +
			", categoryName=" + categoryName +
			", categoryDesc=" + categoryDesc +
			", isDelete=" + isDelete +
			", createtime=" + createtime +
			"}";
	}
}
